package supe;

import java.awt.*;

public class SnakeHead extends GameObj{
     private String direction = "right";
    public String getDirection() {
        return direction;
    }

    public void setDirection(String direction) {
        this.direction = direction;
    }
    public SnakeHead(int x, int y, Image img) {
        super(x, y, img);
    }
    public void move(){
        switch (direction){
            case "right":
            x += 30;
            if (x > 600){
                x = 0;
            }
            break;
        }
    }

    @Override
    public void paintSelf(Graphics graphics) {
        super.paintSelf(graphics);
        move();
    }
}
